package cn.itcast.dao.dept;

import cn.itcast.domain.system.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    //根据企业id去查询所有
    List<User>findAll(String companyId);


    void save(User user);

    void update(User user);

    User findById(String id);

    void delete(String id);

    long findUserRole(String id);

    //根据userId删除角色
    void deleteRole(String userId);

    void saveRole(@Param("userId") String userId, @Param("roleId") String roleId);

    User loginUser(String email);

    User findEmail(String email);
}
